package com.gary.gc;

import java.util.ArrayList;

/**
 * -Xms8m -Xmx8m -XX:+HeapDumpOnOutOfMemoryError
 * @author peng_rui
 * @date 2022/3/6
 */
public class JProfilerOOM {
    private byte[] bytes = new byte[1024 * 1024];

    public static void main(String[] args) {
        ArrayList<JProfilerOOM> jProfilerOOMS = new ArrayList<>();
        while (true) {
            JProfilerOOM jProfilerOOM = new JProfilerOOM();
            jProfilerOOMS.add(jProfilerOOM);
        }
    }
}
